import { routerRedux } from 'dva/router';
import {
  connect,
} from 'dva';
import { Result, Icon, Flex, WhiteSpace, Button } from 'antd-mobile';
import React from 'react';
import styles from './success.css';

class Success extends React.Component {
  render() {
    return (
      <div className={styles.bacgStyle}>
        <Result
          className={styles.ResultStyle}
          img={<Icon type="check-circle" className={styles.iconStyle} style={{ fill: '#1F90E6' }} />}
          title="订单提交成功"
          message="请等待订单审核"
          buttonText={<Button onClick={() => this.props.dispatch(routerRedux.push('/'))} style={{ backgroundColor: '#FFD306' }}>返回首页</Button>
          }
        />
      </div>
    );
  }
}

export default connect(({ car }) => ({ car }))(Success);
